<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border=1px>
    <tr>
        <td>编号</td>
        <td>班级</td>
        <td>操作</td>
    </tr>
    {% for alls in all %}
        <tr>
{#    forloop.counter:  自定义编号,不跟数据库  #}
        <td>{{ forloop.counter }}</td>
        <td>{{ alls.cname }}</td>
        <td>
            <a href="/student/getstu/?cno={{ alls.cno }}">详情</a>
        </td>
        </tr>
    {% endfor %}

</table>
</body>
</html>